<!DOCTYPE html>
<html>
<body>
<script>
function onMessageReceivedInFrame(e) {
    var msg = 'Received message: data="' + e.data + '" origin="' + e.origin + '"';
    if (e.data !== "skip debugger") debugger;
    postMessageToParent(msg);
}

function postMessageToParent(msg)
{
    top.postMessage(msg, "*");
}

window.addEventListener("message", onMessageReceivedInFrame, false);
</script>
</body>
</html>
